package Runde5;

public class Student extends Person {

	private int matrNr;
	
	/**
	 * @precondition name must not be empty, name != null
	 * @postcondition creates a new student with given name and matrNr
	 */
	public Student(String name, int matrNr) {
		super(name);
		this.matrNr = matrNr;
	}
	
	/**
	 * @postcondition delivers a readable form of this instance of student
	 */
	public String toString() {
		return super.toString() + " (" + matrNr + ")";
	}

}
